# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=riemann-cli
_projname=rust-riemann_client
# CAUTION: Regenerate Cargo.lock when upgrading to a new version.
pkgver=0.8.0
pkgrel=0
pkgdesc="CLI client for Riemann written in Rust"
url="https://github.com/borntyping/rust-riemann_client"
arch="x86_64 armv7 armhf aarch64 x86 ppc64le"  # limited by rust/cargo
license="MIT"
makedepends="cargo"
# TODO: Convince upstream to include Cargo.lock in repository.
source="https://github.com/borntyping/rust-riemann_client/archive/v$pkgver/$pkgname-$pkgver.tar.gz
	Cargo.lock
	"
builddir="$srcdir/$_projname-$pkgver"

prepare() {
	default_prepare
	cp "$srcdir"/Cargo.lock "$builddir"/
}

build() {
	cargo build --release --locked
}

check() {
	cargo test --release --locked
}

package() {
	cargo install --locked --path . --root="$pkgdir/usr"
	rm "$pkgdir"/usr/.crates*
}

sha512sums="b2cb8eb8b9fd2bfa21760390d26daaa9e839c210d83dbf1cceb3f2032a7c09b8e213c27592afa8943fbb3d979321a12264c0051a6fbd584cdeee234f1176b73f  riemann-cli-0.8.0.tar.gz
f11d283c455b879caa28f60dc1837826bd9a6e6ea58035199fed143e3bdf003ba3149e553e27a6572eafcef4694694def3b0f823d8f5fee8efa40d9060f7912c  Cargo.lock"
